from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase = "DBshop028"
firefox=openBrowser(url)
firefox.get(urlAdmin)
#调用自定义函数进行后台的登录
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,"商品管理",'商品标签','商品标签分组')
# 1.点击“删除”按钮，确定删除，删除成功。
firefox.find_element_by_link_text("删除").click()
firefox.switch_to.alert.accept()
#获取当前页面的订单数量
try:
    firefox.find_element_by_link_text("删除").is_displayed()
    writeLog("%s 测试失败" % (testCase))
    getPhoto(firefox)
except:
    writeLog("%s 测试通过" % (testCase))
firefox.quit()

